Home:ALL Converter>How to check what values are consumed by a spring boot java application from the Linux command line or in the docker container

How to check what values are consumed by a spring boot java application from the Linux command line or in the docker container

Ask Time:2022-05-06T15:37:14         Author:devops-admin

Json Formatter

How to check what values are consumed by a spring boot java application from the Linux command line or in the docker container?

I have a spring boot java application that has the below parameters for email

spring.mail.host=smtp.gmail.com
spring.mail.port=587
[email protected]
spring.mail.password=${GPASSWORD}
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.ssl.trust=smtp.gmail.com

I'm passing GPASSWORD as an environment variable to the docker/k8s container.

How can I check what value/values are being consumed by the java application, especially spring.mail.password field.

I tried the below commands

printenv 

env 

But they list all environment variables being passed to all containers like the below environment variable.

GPASSWORD=bond007

So Is there a way to check what values are being consumed by the spring boot java application inside a pod or container?

Author:devops-admin,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/72137783/how-to-check-what-values-are-consumed-by-a-spring-boot-java-application-from-the
yy